﻿<Window x:Class="Aeon.Emulator.Launcher.PerformanceWindow"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        Title="Aeon Performance" Height="300" Width="500" ShowInTaskbar="False" Icon="Aeon.ico" MinWidth="400" MinHeight="200" WindowStyle="SingleBorderWindow">
    <Window.Resources>
        <Style x:Key="expanderSeparator" TargetType="{x:Type Rectangle}">
            <Setter Property="Height" Value="2" />
            <Setter Property="Stroke" Value="Transparent" />
            <Setter Property="Fill">
                <Setter.Value>
                    <LinearGradientBrush StartPoint="0,0.5" EndPoint="1,0.5">
                        <GradientStop Color="White" Offset="0" />
                        <GradientStop Color="DarkGray" Offset="0.5" />
                        <GradientStop Color="White" Offset="1" />
                    </LinearGradientBrush>
                </Setter.Value>
            </Setter>
        </Style>
        <Style x:Key="expanderStyle" TargetType="{x:Type Expander}">
            <Style.Triggers>
                <Trigger Property="IsMouseOver" Value="True">
                    <Setter Property="Background">
                        <Setter.Value>
                            <LinearGradientBrush StartPoint="0.5,0" EndPoint="0.5,1">
                                <GradientStop Color="AliceBlue" Offset="0" />
                                <GradientStop Color="White" Offset="1" />
                            </LinearGradientBrush>
                        </Setter.Value>
                    </Setter>
                </Trigger>
            </Style.Triggers>
        </Style>
    </Window.Resources>
    <DockPanel>
        <Label Content="Emulator Statistics" FontSize="20" Foreground="DarkBlue" DockPanel.Dock="Top" />
        <ScrollViewer VerticalScrollBarVisibility="Auto">
            <StackPanel Margin="20,0,0,0" CanVerticallyScroll="True">
                <Rectangle Style="{StaticResource expanderSeparator}" />
                <Expander Name="processorExpander" Height="Auto" IsExpanded="True" Style="{StaticResource expanderStyle}">
                    <Expander.Header>
                        <Label Content="Processor" FontSize="16" Foreground="SteelBlue" />
                    </Expander.Header>
                    <Grid Margin="30,0,0,0">
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition Width="Auto" />
                            <ColumnDefinition Width="*" />
                        </Grid.ColumnDefinitions>
                        <Grid.RowDefinitions>
                            <RowDefinition Height="Auto" />
                            <RowDefinition Height="Auto" />
                        </Grid.RowDefinitions>
                        <Label Content="Instructions emulated:" Height="28" HorizontalAlignment="Left"  VerticalAlignment="Top" Width="Auto" />
                        <Label Content="Instructions per second:" Height="28" HorizontalAlignment="Left" VerticalAlignment="Top" Width="Auto" Grid.Row="1" />
                        <Label Name="instructionsLabel" Content="0" Height="28" HorizontalAlignment="Right" VerticalAlignment="Top" Width="Auto" Grid.Column="1" />
                        <Label Name="ipsLabel" Content="0" Height="28" HorizontalAlignment="Right" VerticalAlignment="Top" Width="Auto" Grid.Column="1" Grid.Row="1" />
                    </Grid>
                </Expander>
                <Rectangle Style="{StaticResource expanderSeparator}" />
                <Expander Name="memoryExpander" Height="Auto" IsExpanded="True" Style="{StaticResource expanderStyle}">
                    <Expander.Header>
                        <Label Content="Memory" FontSize="16" Foreground="SteelBlue" />
                    </Expander.Header>
                    <Grid Margin="30,0,0,0">
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition Width="Auto" />
                            <ColumnDefinition Width="*" />
                        </Grid.ColumnDefinitions>
                        <Grid.RowDefinitions>
                            <RowDefinition Height="Auto" />
                            <RowDefinition Height="Auto" />
                            <RowDefinition Height="Auto" />
                        </Grid.RowDefinitions>
                        <Label Content="Conventional memory:" />
                        <Label Name="conventionalMemoryLabel" Grid.Column="1" HorizontalAlignment="Right" />
                        <Label Content="Expanded memory:" Grid.Row="1" />
                        <Label Name="expandedMemoryLabel" Grid.Column="1" Grid.Row="1" HorizontalAlignment="Right" />
                        <Label Content="Extended memory:" Grid.Row="2" />
                        <Label Name="extendedMemoryLabel" Grid.Column="1" Grid.Row="2" HorizontalAlignment="Right" />
                    </Grid>
                </Expander>
                <Rectangle Style="{StaticResource expanderSeparator}" />
                <Expander Header="I/O" Height="Auto" Visibility="Collapsed">
                </Expander>
            </StackPanel>
        </ScrollViewer>
    </DockPanel>
</Window>
